package com.kevin.kafka;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

@Service
public class KafkaService {

    @KafkaListener(topics = "position")
    public void listen(String message) {
        System.out.println("Received message: " + message);
        // 在这里处理接收到的消息逻辑
    }
}
